
//Copyright 1997-2009 Syrinx Development, Inc.
//This file is part of the Syrinx Web Application Framework (SWAF).
// == BEGIN LICENSE ==
//
// Licensed under the terms of any of the following licenses at your
// choice:
//
//  - GNU General Public License Version 3 or later (the "GPL")
//    http://www.gnu.org/licenses/gpl.html
//
//  - GNU Lesser General Public License Version 3 or later (the "LGPL")
//    http://www.gnu.org/licenses/lgpl.html
//
//  - Mozilla Public License Version 1.1 or later (the "MPL")
//    http://www.mozilla.org/MPL/MPL-1.1.html
//
// == END LICENSE ==
using System;
using Swaf.BizObj;
using Swaf.Container;

namespace Swaf.Security
{
	/// <summary>
	/// Resources are the primary elements to which security is applied.  A resource 
	/// represents an element in a system that needs to be secured.  These could be 
	/// pages, UI elements, business rules or any other element that needs to be secured.  
	/// The only resource that has direct meaning with CSF currently is the BizRule resource.  
	/// It will be discussed more below.
	/// 
	/// The IResource interface exposes the methods and properties common to all resources.
	/// </summary>
	public interface IResource : INameAddressSupport
	{
		/// <summary>
		/// The effectivePrivilege property returns the privilige for this resource.
		/// </summary>
		Privileges effectivePrivilege{get;}
		
		/// <summary>
		/// Returns the name of this resource.  This name must be unique within a ResourceSet.
		/// </summary>
		string name{get;}
		
		/// <summary>
		/// Creates a copy of the current resource, including any children.
		/// </summary>
		/// <returns></returns>
		IResource clone();
		
		/// <summary>
		/// Returns an INameAddressSupport reference to any resources contained within this resource.
		/// </summary>
		INameAddressSupport resources{get;}

        /// <summary>
        /// Returns a bizobj representation of this resource.
        /// </summary>
	    IBizObj bizObj { get;}
	}
}
